const sidebar = require("./config/sidebar.js");
const markdown = require("./config/md.js");

module.exports = {
    base: "/cp-ui-wc/",
    title: "cp-ui",
    head: [
        ["link", { rel: "icon", href: "/logo.png" }],
        ["link", { rel: "manifest", href: "/manifest.json" }],
        ["meta", { name: "theme-color", content: "#3eaf7c" }],
        ["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
        ["meta", { name: "apple-mobile-web-app-status-bar-style", content: "black" }],
        ["link", { rel: "apple-touch-icon", href: "/icons/apple-touch-icon-152x152.png" }],
        ["link", { rel: "mask-icon", href: "/icons/safari-pinned-tab.svg", color: "#3eaf7c" }],
        ["meta", { name: "msapplication-TileImage", content: "/icons/msapplication-icon-144x144.png" }],
        ["meta", { name: "msapplication-TileColor", content: "#000000" }]
    ],
    extraWatchFiles: [
        "./config/sidebar.js", // 使用相对路径
        "./config/md.js" // 使用相对路径
    ],
    plugins: [
        "@vuepress/pwa",
        "@vuepress/active-header-links",
        "@vuepress/back-to-top",
        {
            sidebarLinkSelector: ".sidebar-link",
            headerAnchorSelector: ".header-anchor",
            serviceWorker: true,
            updatePopup: true
        }
    ],
    themeConfig: {
        smoothScroll: true, // 滚动动画
        displayAllHeaders: true,
        nav: [{ text: "码云(Gitee)", link: "https://gitee.com/guojikun_admin/cp-ui-wc.git" }],
        sidebar: sidebar
    },
    markdown: markdown
};
